4fe3f2c15d4e65f52b66fb53709e165d563c8619,workbench/make/source_gen/jetbrains/mps/workbench/make/UIQueryRelayStrategy.java,UIQueryRelayStrategy,relayQuery,#IQuery#IOperationContext#,22

Before Change


    if (res == JOptionPane.CLOSED_OPTION) {
      return query.voidOption();
    }
    return ListSequence.fromList(Sequence.fromIterable(query.options()).toListSequence()).getElement(res);
  }

  public static interface DialogListener {

After Change


  }

  public <T extends IOption> T relayQuery(final IQuery<T> query, final IOperationContext context) {
    List<T> optList = Sequence.fromIterable(query.options()).toListSequence();
    final String[] options = ListSequence.fromList(optList).<String>select(new ISelector<T, String>() {
      public String select(T o) {
        return o.getText();
      }
    }).toGenericArray(String.class);
    final int defopt = ListSequence.fromList(optList).indexOf(query.defaultOption());
    final Wrappers._int res = new Wrappers._int(-1);
    ThreadUtils.runInUIThreadAndWait(new Runnable() {
      public void run() {
        res.value = Messages.showDialog(context.getProject(), query.getText(), query.getName().toString(), options, defopt, defopt, Messages.getQuestionIcon());
      }
    });
    if (res.value < 0) {
      return query.voidOption();
    }
    return ListSequence.fromList(optList).getElement(res.value);
  }

  public static interface DialogListener {